package com.rabbiter.hotel.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rabbiter.hotel.domain.User;
import com.rabbiter.hotel.dto.ReturnUserDTO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author：
 * @date：2024/01/01 12:00
 * Description：
 */
public interface UserMapper extends BaseMapper<User> {

    @Select("SELECT u.user_name FROM t_order o JOIN user u ON o.user_id = u.id WHERE o.number =  #{number} ")
    List<String> findUserByNumber(Integer number);
}
